<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@include file="/common/common.jsp"%>
<%@include file="/common/skins/skin0/component.jsp" %>
<h:css href="/css/style1/style-custom.css"/>
<%--
- Author(s): pengweiling
- Date: 2012-07-22 15:37:52
- Description:
--%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>
      选择WeOrderLineV
    </title>
  </head>
  <body>
    <e:datasource name="criteria" type="entity" path="com.primeton.das.criteria.criteraiType" />
    <e:datasource name="page" type="entity" path="com.eos.foundation.PageCond" />
    <queryform id= "7e5aea86-65bd-45c7-b2ec-47ab351d3915">
      <h:form  name="query_form" action="com.hms.commonPick.WeOrderLineVSelect.flow" checkType="blur" target="_self" method="post" onsubmit="return checkForm(this);">
        <input type="hidden" name="_eosFlowAction" value="query"/>
          <table align="center" border="0" width="100%" class="form_table">
            <tr>
              <td class="form_label">
                客单号
              </td>
              <td colspan="1">
                <h:text property="criteria/_expr[1]/cgresno"/>
                <h:hidden property="criteria/_expr[1]/_op" value="like"/>
                <h:hidden property="criteria/_expr[1]/_likeRule" value="all"/>
              </td>
              <td class="form_label">
                房间号
              </td>
              <td colspan="1">
                <h:text property="criteria/_expr[2]/croomno"/>
                <h:hidden property="criteria/_expr[2]/_op" value="like"/>
                <h:hidden property="criteria/_expr[2]/_likeRule" value="all"/>
              </td>
            </tr>
            <tr>
              <td class="form_label">
                订单号
              </td>
              <td colspan="1">
                <h:text property="criteria/_expr[3]/corderno"/>
                <h:hidden property="criteria/_expr[3]/_op" value="like"/>
                <h:hidden property="criteria/_expr[3]/_likeRule" value="all"/>
              </td>
              <td class="form_label">
                客单状态
              </td>
              <td colspan="1">
                <h:select property="criteria/_expr[4]/cstatus">
                  <option value=""></option>
                  <option value="R">预订</option>
                  <option value="I">在住</option>
                  <option value="O">离店</option>
                  <option value="N">未到</option>
                  <option value="X">取消</option>                                                                                                   
                </h:select>
                <h:hidden property="criteria/_expr[4]/_op" value="="/>
              </td>
            </tr>
            <tr>
              <td class="form_label">
                订单状态
              </td>
              <td colspan="1">
                <h:select property="criteria/_expr[5]/orderstatus">
                  <option value=""></option>
                  <option value="C">取消</option>
                  <option value="B">待审核</option>
                  <option value="P">待支付确认</option>
                  <option value="Y">审核确认</option>
                  <option value="I">入住</option>  
                  <option value="X">已退未结</option>                    
                  <option value="O">已结</option>     
                  <option value="D">已结未退</option>                                                     
                  <option value="S">未提交</option>                                                                       
                </h:select>
                
                <h:hidden property="criteria/_expr[5]/_op" value="="/>
              </td>
              <td class="form_label">
                房间状态
              </td>
              <td colspan="1">
                <h:select property="criteria/_expr[6]/roomusestatus">
                  <option value=""></option>
                  <option value="V">可用</option>
                  <option value="R">小维修</option>
                  <option value="S">停用</option>
                  <option value="D">自住</option>
                  <option value="B">大维修</option>  
                </h:select>                
                <h:hidden property="criteria/_expr[6]/_op" value="="/>
              </td>
            </tr>
            <tr class="form_bottom">
              <td colspan="4" class="form_bottom">
                <input type="hidden" name="criteria/_entity" value="com.hms.commonPick.data.WeOrderLineV">
                每页显示
                <h:text size="2" property="page/length" value="10" validateAttr="minValue=1;maxValue=100;type=integer;isNull=true" />
                <input type="hidden" name="page/begin" value="0">
                <input type="hidden" name="page/isCount" value="true">
                <input type="submit" value="查询" class="button">
              </td>
            </tr>
          </table>
      </h:form>
    </queryform>
    <br/>
    <viewlist id= "0961331f-857b-4b76-b129-f2f5a2551cdb">
      <h:form name="page_form" action="com.hms.commonPick.WeOrderLineVSelect.flow" method="post">
        <input type="hidden" name="_eosFlowAction" value="query" >
        <h:hiddendata property="criteria" />
        <h:hidden property="page/begin"/>
        <h:hidden property="page/length"/>
        <h:hidden property="page/count"/>
        <h:hidden property="page/isCount"/>
          <table align="center" border="0" width="100%" class="EOS_table">
            <tr>
              <th align="center">
                选择
              </th>
              <th>
                客单号
              </th>
              <th>
                房号
              </th>
              <th>
                订单号
              </th>
              <th>
                客单状态
              </th>
              <th>
                订单状态
              </th>
              <th>
                房间状态
              </th>
            </tr>
            <w:radioGroup id="group1">
              <l:iterate property="weorderlinevs" id="id1">
                <tr class="<l:output evenOutput='EOS_table_row' />">
                  <td align="center">
                    <w:rowRadio>
                      <h:param name='igresid' iterateId='id1' property='igresid'/>
                      <h:param name='cgresno' iterateId='id1' property='cgresno'/>
                      <h:param name='iorderid' iterateId='id1' property='iorderid'/>                      
                      <h:param name='corderno' iterateId='id1' property='corderno'/>                                            
                      <h:param name='cguestname' iterateId='id1' property='cguestname'/>                               
                      <h:param name='iroomid' iterateId='id1' property='iroomid'/>       
                      <h:param name='croomno' iterateId='id1' property='croomno'/>                          
                    </w:rowRadio>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="cgresno"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="croomno"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="corderno"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="gresstatus"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="orderstatus"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="roomusestatus"/>
                  </td>
                </tr>
              </l:iterate>
            </w:radioGroup>
            <tr>
              <td colspan="7" class="command_sort_area">
                <l:greaterThan property="page/size" targetValue="0" compareType="number">
                  <input type="button" value="选择" onclick="selectRecord();" class="button">
                </l:greaterThan>
                <input type="button" value="取消选择值" onclick="unSelectRecord();" class="button">
                <input type="button" value="关闭" onclick="window.close();" class="button">
                <h4>
                  <l:equal property="page/isCount" targetValue="true">
                    共
                    <b:write property="page/count"/>
                    条记录 第
                    <b:write property="page/currentPage"/>
                    页/
                    <b:write property="page/totalPage"/>
                    页
                  </l:equal>
                  <l:equal property="page/isCount" targetValue="false">
                    第
                    <b:write property="page/currentPage"/>
                    页
                  </l:equal>
                  <input type="button" onclick="firstPage('page', 'query', null, null, 'page_form');" value="首页"  <l:equal property="page/isFirst" targetValue="true">disabled</l:equal> >
                  <input type="button" onclick="prevPage('page', 'query', null, null, 'page_form');" value="上页" <l:equal property="page/isFirst" targetValue="true">disabled</l:equal> >
                  <input type="button" onclick="nextPage('page', 'query', null, null, 'page_form');" value="下页" <l:equal property="page/isLast" targetValue="true">disabled</l:equal> >
                  <l:equal property="page/isCount" targetValue="true">
                    <input type="button" onclick="lastPage('page', 'query', null, null, 'page_form');" value="尾页" <l:equal property="page/isLast" targetValue="true">disabled</l:equal> >
                  </l:equal>
                </h4>
              </td>
            </tr>
          </table>
      </h:form>
    </viewlist>
    <script>
      window.resize(600, 480);
      window.moveCenter();
      function selectRecord()
      {
        var g = $id("group1");
        if (g.getSelectRow() == null) {
          alert("请选择一行记录");
          return;
        }
        var ret = new Array;
        ret[0] = g.getParam("igresid");
        ret[1] = g.getParam("cgresno");
        ret[2] = g.getParam("iorderid");
        ret[3] = g.getParam("corderno");
        ret[4] = g.getParam("cguestname");
        ret[5] = g.getParam("iroomid");
        ret[6] = g.getParam("croomno");

        window.returnValue = ret;
        window.close();
      }

      function unSelectRecord()
      {
        var ret = new Array;
        ret[0] = "";
        ret[1] = "";
        window.returnValue = ret;
        window.close();
      }
    </script>
  </body>
</html>
